char * countAndSay(int n){
    char *s = (char *)malloc(sizeof(char) * (n * n * n * 2  + 1));
    char *t = (char *)malloc(sizeof(char) * (n * n * n * 2  + 1));
    *s = '1';
    *(s + 1) = '\0';
    for(int i = 1; i < n;i++){
        char ch,*p,*q;
        int count = 1;
        p = s  + 1;
        ch = *s;
        q = t;
        while(ch && *p){
            if(ch != *p){
                *q = count + '0';
                *(q + 1) = ch;
                count = 1;
                q += 2;
            }else count ++;
            ch = *p;
            p++;
        }
        *q = count + '0';
        *(q + 1) = ch;`
        *(q + 2) = '\0';
        char *x = t;
        t = s;
        s = x;
    }
    return s;
}
